#
# Copyright 2021 Staysail Systems, Inc. <info@staystail.tech>
#
# This software is supplied under the terms of the MIT License, a
# copy of which should be located in the distribution where this
# file was obtained (LICENSE.txt).  A copy of the license may also be
# found online at https://opensource.org/licenses/MIT.
#

#  Mqtt.
nng_directory(core)

nng_check_sym(strlcpy string.h NNG_HAVE_STRLCPY)
nng_check_sym(strnlen string.h NNG_HAVE_STRNLEN)
nng_check_sym(strcasecmp string.h NNG_HAVE_STRCASECMP)
nng_check_sym(strncasecmp string.h NNG_HAVE_STRNCASECMP)

nng_sources(
   mqtt_public.c
   mqtt_codec.c
   mqtt_msg.c
   mqtt_msg.h 
   mqtt_qos_db_api.c
   mqtt_qos_db_api.h
)

nng_test(mqtt_test)

nng_sources_if(NNG_ENABLE_SQLITE  
   mqtt_qos_db.c 
   mqtt_qos_db.h
)

nng_test_if(NNG_ENABLE_SQLITE mqtt_qos_db_test)
